package com.jiaanpei.frameproject.manage;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import com.jiaanpei.frameproject.gen.DaoMaster;
import com.jiaanpei.frameproject.gen.UserDao;
import com.jiaanpei.frameproject.modle.bean.db.User;

import org.greenrobot.greendao.database.Database;

import static com.github.yuweiguocn.library.greendao.MigrationHelper.migrate;

public class MySQLiteOpenHelper extends DaoMaster.OpenHelper {
    public MySQLiteOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name, factory);
    }
    @Override
    public void onUpgrade(Database db, int oldVersion, int newVersion) {

        migrate(
                db,
                UserDao.class

        );
    }
}
